{extend name="public/member/member_base" /}

{block name="style"}
<link href="__STATIC__/admin/plugin/my_uploader/css/uploads.css" rel="stylesheet">
	<style>
		.form-group{}
		.form-group .row{
			text-align: center;
		}
		.form-group .form-control{width:270px;height:30px;}

		.main {
			width: 790px;
			border-radius: 4px;
            margin:0 auto;
		}

		.main .explain {
			font: 16px/32px "microsoft yahei";
			color: #777;
			text-align: center;
			margin: 120px 0 100px 0;
		}
		.main .explain i {
			background-position: 0px -160px;
			vertical-align: middle;
			display: inline-block;
			width: 32px;
			height: 32px;
			margin-right: 8px;
		}
		.main .note {
			color: #1279BB;
			line-height: 16px;
			padding: 10px 0;
			margin-bottom: 10px;
			border-bottom: dashed 1px #CBDDE6;
		}
		.main .note i {
			background-position: -62px -140px;
			vertical-align: top;
			display: inline-block;
			width: 11px;
			height: 16px;
			margin-right: 6px;
		}
		.main .explain1 {
			font: 16px/32px "microsoft yahei";
			color: #777;
			text-align: left;
			margin: 10px 0 20px 0
		}
		.main .explain1 i {
			background-position: 0px -160px;
			vertical-align: middle;
			display: inline-block;
			width: 32px;
			height: 32px;
			margin-right: 8px;
		}
		.main table.all {
			line-height: 22px;
			color: #555;
			width: 790px;
			margin-top: 20px;
			border-bottom: dashed 1px #CBDDE6;
		}
		.main table.all thead th {
			font: 14px/22px "microsoft yahei";
			color: #333;
			height: 22px;
			padding: 8px 4px;
		}
		.main table.all thead th em {
			color: #F00;
			margin-left: 12px;
		}
		.main table.all tbody th {
			vertical-align: top;
			text-align: right;
			width: 180px;
			height: 22px;
			padding: 8px 4px;
			font-style: normal;
			font-weight: normal;
		}
		.main table.all tbody th i {
			line-height: -999px;
			background-position: -51px -140px;
			vertical-align: middle;
			display: inline-block;
			width: 7px;
			height: 7px;
			margin-right: 6px;
			overflow: hidden;
			color:red;
			font-size:18px;
		}
		.main table.all tbody th i {
			*display: inline/*IE7*/;
		}
		.main table.all tbody td {
			vertical-align: top;
			text-align: left;
			height: 20px;
			padding: 8px 4px
		}
		.main table.all tbody td span {
			*display: none/*IE7*/;
			color: #777;
			clear: both;
			float: left;
			margin-top: 10px;
		}
		.main table.all tbody td span.block {
			display: block;
			width: 600px
		}
		.main table.all tbody td p.emphasis {
			color: #F30;
		}
		.main tabel.all tfoot td {
			line-height: 20px;
			height: 20px;
			padding: 0;
		}
		.main table.type {
			width: 600px;
			margin: 0 auto;
			border: solid 1px #DDD;
		}
		.main table.type thead th {
			color: #777;
			text-align: center;
			background-color: #F7F7F7;
			width: 25%;
		}
		.main table.type tbody td {
			text-align: center;
			border-style: solid;
			border-width: 1px 1px 0 0;
			border-color: #DDD #DDD transparent transparent;
		}
		.main table.type tbody td a {
			color: #F30;
		}
		.main .bottom, .apply-agreement .bottom, .joinin-pay .bottom {
			text-align: center;
			height: 30px;
			margin: 30px 0 10px 0;
		}
		.main .btn, .apply-agreement .btn, .joinin-pay .btn {
			display: inline-block;
			height: 40px;
			padding: 0px 12px;
			margin-right: 10px;
			border: none;
			cursor: pointer;
			background-color: #F37B1D;
			color: #fff;
		}

		input[type="text"] {
			height: 20px;
			line-height: 20px;
			background-color: #ffffff;
			vertical-align: middle;
			display: inline-block;
			padding: 5px;
			border: solid 1px #ddd;
		}

		select {
			border: 1px solid #DDDDDD;
			height: 30px;
			width: auto;
			line-height: 30px;
			padding: 0px 5px;
		}
		label {
			cursor: pointer;
		}
		label input[type="radio"] {
			vertical-align: middle;
		}
		textarea {
			border: 1px solid #DDDDDD;
		}
	</style>
{/block}

{block name="main"}
<div class="cont-main" style="float: right;">
	<div class="main-wrap mt15">
		<h3>
			<strong style="font-size: 14px;  color: #3d3d3d;">商家入驻</strong>
		</h3>

		<div class="main">
			<div>
				<table border="0" cellpadding="0" cellspacing="0" class="all">
					<thead>
					<tr><th colspan="2" align="left">请选择您的开店身份</th></tr>
					</thead>
					<tbody>
					<?php if(!empty($shop_apply)){?>
					<tr>
						<td>
							<input type="radio" name="shop_apply_type" value="1" <?=$shop_apply['apply_type'] == 1?'checked="checked"':''?> checked="checked" > 个人
							<input type="radio" name="shop_apply_type" value="2" <?=$shop_apply['apply_type'] == 2?'checked="checked"':''?>> 企业
						</td>
					</tr>
					<?php }else{ ?>
					<tr>
						<td>
							<input type="radio" name="shop_apply_type" value="1" checked="checked" > 个人
							<input type="radio" name="shop_apply_type" value="2"> 企业
						</td>
					</tr>
					<?php }?>
					</tbody>
				</table>
			</div>
			<div id="apply_person_info" class="apply-company-info" style="display: block;">
				<div class="note"><i></i>以下所需要上传的电子版资质文件仅支持JPG\GIF\PNG格式图片，大小请控制在4096K之内。</div>
				<form id="form_person_info" action="" method="post" enctype="multipart/form-data">
                    <input type="hidden" name="apply_type">
					<table border="0" cellpadding="0" cellspacing="0" class="all">
						<thead>
						<tr>
							<th colspan="20" align="left">店铺经营信息</th>
						</tr>
						</thead>
						<tbody>
						<tr>
							<th class="w150 Validform_label"><i>*</i>店铺名称：</th>
							<td><input name="shop_name" type="text" class="w200" value="<?=$shop['shop_name']?>" datatype="*"> <span></span><p class="emphasis">店铺名称注册后不可修改，请认真填写。</p></td>
						</tr>
						<tr>
							<th class="Validform_label"><i>*</i>店铺等级：</th>
							<td>
								<select name="shop_type_id" size="1" datatype="*">
									<option value="">请选择</option>
									<option value="1" <?=$shop['shop_type_id'] == 1?'selected="selected"':''?> >直营店铺</option>
									<option value="2" <?=$shop['shop_type_id'] == 2?'selected="selected"':''?>>入驻店铺</option>
								</select> <span></span>
								<div id="grade_explain" class="grade_explain"></div>
							</td>
						</tr>
						<tr>
							<th class="Validform_label"><i>*</i>店铺分类：</th>
							<td>
								<select name="shop_group_id" datatype="*">
									<option value="">请选择</option>
									<?php if(!empty($shop_group)){ foreach($shop_group as $k=>$v){?>
									<option  <?=$shop['shop_group_id'] == $v['id']?'selected="selected"':''?> value="<?=$v['id']?>"><?=$v['group_name']?></option>
									<?php }}?>
								</select>
								<span></span>
								<p class="emphasis">请根据您所经营的内容认真选择店铺分类，注册后商家不可自行修改。</p>
							</td>
						</tr>

						<!-- 								<tr>
                                                            <th class="w150">推荐人编号：</th>
                                                            <td>
                                                                <input name="shop_name" type="text" class="w200" value="" id="assistant_code">
                                                                <p class="emphasis"></p>
                                                            </td>
                                                        </tr> -->
						</tbody>
						<tfoot><tr><td colspan="20">&nbsp;</td></tr></tfoot>
					</table>
					<table border="0" cellpadding="0" cellspacing="0" class="all">
						<thead>
						<tr><th colspan="2" align="left">请按照提示填写本人真实的资料</th></tr>
						</thead>
						<tbody>
						<tr>
							<th class="Validform_label"><i>*</i>公司名称：</th>
							<td><input name="company_name" type="text" value="<?=$shop_apply['company_name']?>" class="w200" id="company_name" datatype="*"> <span></span></td>
						</tr>
						<tr>
							<th class="Validform_label"><i>*</i>联系地址：</th>
							<td>
								<select name="province_id" id="seleAreaNext" onchange="getSelCity('#seleAreaThird',this)" datatype="*">
									<option value="0">请选择省</option>
									<?php foreach($province as $k=>$v){?>
									<option value="<?=$v['id']?>"><?=$v['name']?></option>
									<?php }?>
								</select>
								<select name="city_id" id="seleAreaThird" onchange="getSelCity('#seleAreaFouth',this);">
									<option value="0">请选择市</option>
								</select>
								<select name="district_id" id="seleAreaFouth" >
									<option value="-1">请选择区</option>
								</select><span></span>
							</td>
						</tr>
						<tr>
							<th class="Validform_label"><i>*</i>详细地址：</th>
							<td><input name="address_detail" class="w200" type="text" value="<?=$shop_apply['address_detail']?>" id="company_address_detail" datatype="*"> <span></span></td>
						</tr>
						<tr>
							<th class="Validform_label"><i>*</i>姓名：</th>
							<td><input name="contacts_name" type="text" class="w200" value="<?=$shop_apply['contacts_name']?>" id="contacts_name" datatype="*"> <span></span></td>
						</tr>
						<tr>
							<th class="Validform_label"><i>*</i>联系人电话：</th>
							<td><input name="contacts_phone" type="text" class="w200" value="<?=$shop_apply['contacts_phone']?>" id="contacts_phone" datatype="m" errormsg="联系人电话格式不正确"> <span></span></td>
						</tr>
						<tr>
							<th class="Validform_label"><i>*</i>电子邮箱：</th>
							<td><input type="text" name="contacts_email" size="45" value="<?=$shop_apply['contacts_email']?>" class="w200" id="contacts_email" datatype="e" errormsg="电子邮格式不正确"> <span></span></td>
						</tr>
						</tbody>
						<tfoot><tr><td colspan="20">&nbsp;</td></tr></tfoot>
					</table>
					<table border="0" cellpadding="0" cellspacing="0" class="all">
						<thead>
						<tr><th colspan="20" align="left">身份证信息</th></tr>
						</thead>
						<tbody>
						<tr>
							<th class="Validform_label"><i>*</i>身份证号码：</th>
							<td><input name="contacts_card_no" type="text" class="w200" value="<?=$shop_apply['contacts_card_no']?>" id="contacts_card_no" datatype="*"> <span></span></td>
						</tr>
						<tr>
							<th class="Validform_label"><i>*</i>手持身份证照片：</th>
							<td>
								<div class="test">
									<div class="up-button" id="select-img">选择图片</div>
									<div class="img-list" id="img-list">
										<!--图片列表样例-->
										<div class="img-item">
											<img src="__STATIC__/admin/plugin/my_uploader/images/defalut.jpg">
											<input type="hidden" name="contacts_card_electronic_1" />
											<em class="delete" onclick="uploader.del_list(this)">×</em>
										</div>
									</div>
								</div>

								<span id="id-hand-s"></span>
							</td>
						</tr>
						<tr>
							<th class="Validform_label"><i>*</i>身份证正面：</th>
							<td>
                                <div class="test">
                                    <div class="up-button" id="select-img2">选择图片</div>
                                    <div class="img-list" id="img-list2">
                                        <!--图片列表样例-->
                                        <div class="img-item">
                                            <img src="__STATIC__/admin/plugin/my_uploader/images/defalut.jpg">
                                            <input type="hidden" name="contacts_card_electronic_2" />
                                            <em class="delete" onclick="uploader.del_list(this)">×</em>
                                        </div>
                                    </div>
                                </div>
							</td>
						</tr>
						<tr>
							<th class="Validform_label"><i>*</i>身份证反面：</th>
							<td>
                                <div class="test">
                                    <div class="up-button" id="select-img3">选择图片</div>
                                    <div class="img-list" id="img-list3">
                                        <!--图片列表样例-->
                                        <div class="img-item">
                                            <img src="__STATIC__/admin/plugin/my_uploader/images/defalut.jpg">
                                            <input type="hidden" name="contacts_card_electronic_3" />
                                            <em class="delete" onclick="uploader.del_list(this)">×</em>
                                        </div>
                                    </div>
                                </div>
							</td>
						</tr>
						</tbody>
						<tfoot><tr><td colspan="20">&nbsp;</td></tr></tfoot>
					</table>
					<table border="0" cellpadding="0" cellspacing="0" class="all">
						<thead>
						<tr>
							<th colspan="20" align="left">开户银行信息</th>
						</tr>
						</thead>
						<tbody>
						<tr>
							<th class="w150 Validform_label"><i>*</i>银行开户名：</th>
							<td><input name="bank_account_name" id="bank_account_name" type="text" class="w200" value="<?=$shop_apply['bank_account_name']?>" datatype="*"> <span></span></td>
						</tr>
						<tr>
							<th class="Validform_label"><i>*</i>个人银行账号：</th>
							<td><input name="bank_account_number" id="bank_account_number" type="text" class="w200" value="<?=$shop_apply['bank_account_number']?>" datatype="*"><span></span></td>
						</tr>
						<tr>
							<th class="Validform_label"><i>*</i>开户银行支行名称：</th>
							<td><input name="bank_name" type="text" id="bank_name" class="w200" value="<?=$shop_apply['bank_name']?>" datatype="*"> <span></span></td>
						</tr>
						<tr>
							<th class="Validform_label"><i>*</i>支行联行号：</th>
							<td><input name="bank_code" type="text" id="bank_code" class="w200" value="<?=$shop_apply['bank_code']?>" datatype="*"> <span></span></td>
						</tr>
						</tbody>
						<tfoot><tr><td colspan="20">&nbsp;</td></tr></tfoot>
					</table>
					<input type="hidden" name="shownum" value="1">
					<input type="hidden" name="do" value="1">
					<input type="hidden" name="person" value="1">
					<div class="bottom">
                        <button  style="width: 120px;height: 34px;background-color: #F37B1D;border: 0;border-radius: 5px;color: #fff;">提交</button>
					</div>
				</form>
			</div>
			<div id="apply_company_info" class="apply-company-info" style="display: none">
				<div class="note"><i></i>以下所需要上传的电子版资质文件仅支持JPG\GIF\PNG格式图片，大小请控制在4096K之内。</div>
				<form id="form_company_info" name="form_company_info" action="" method="post" enctype="multipart/form-data">
                    <input type="hidden" name="apply_type">
					<table border="0" cellpadding="0" cellspacing="0" class="all">
						<thead>
						<tr>
							<th colspan="20" align="left">店铺经营信息</th>
						</tr>
						</thead>
						<tbody>
						<tr>
							<th class="w150 Validform_label"><i>*</i>店铺名称：</th>
							<td><input name="shop_name" type="text" class="w200" value="<?=$shop['shop_name']?>" datatype="*"> <span></span><p class="emphasis">店铺名称注册后不可修改，请认真填写。</p></td>
						</tr>
						<tr>
							<th class="Validform_label"><i>*</i>店铺等级：</th>
							<td>
								<select name="shop_type_id" size="1" datatype="*">
									<option value="">请选择</option>
									<option value="1" <?=$shop['shop_type_id'] == 1?'selected="selected"':''?> >直营店铺</option>
									<option value="2" <?=$shop['shop_type_id'] == 2?'selected="selected"':''?>>入驻店铺</option>
								</select> <span></span>
								<div id="grade_explain" class="grade_explain"></div>
							</td>
						</tr>
						<tr>
							<th class="Validform_label"><i>*</i>店铺分类：</th>
							<td>
								<select name="shop_group_id" datatype="*">
									<option value="">请选择</option>
									<?php if(!empty($shop_group)){ foreach($shop_group as $k=>$v){?>
									<option  <?=$shop['shop_group_id'] == $v['id']?'selected="selected"':''?> value="<?=$v['id']?>"><?=$v['group_name']?></option>
									<?php }}?>
								</select>
								<span></span>
								<p class="emphasis">请根据您所经营的内容认真选择店铺分类，注册后商家不可自行修改。</p>
							</td>
						</tr>

						<!-- 								<tr>
                                                            <th class="w150">推荐人编号：</th>
                                                            <td>
                                                                <input name="shop_name" type="text" class="w200" value="" id="assistant_code">
                                                                <p class="emphasis"></p>
                                                            </td>
                                                        </tr> -->
						</tbody>
						<tfoot><tr><td colspan="20">&nbsp;</td></tr></tfoot>
					</table>
					<table border="0" cellpadding="0" cellspacing="0" class="all">
						<thead>
						<tr>
							<th colspan="2" align="left">公司及联系人信息</th>
						</tr>
						</thead>
						<tbody>
						<tr>
							<th class="Validform_label"><i>*</i>公司名称：</th>
							<td><input name="company_name" type="text" value="<?=$shop_apply['company_name']?>" class="w200" id="company_name_2"  datatype="*"> <span></span></td>
						</tr>
						<tr>
							<th class="Validform_label"><i>*</i>公司所在地：</th>
							<td>
								<select name="province_id" id="seleAreaNext" onchange="getSelCity('#seleAreaThird2',this)" datatype="*">
									<option value="0">请选择省</option>
									<?php foreach($province as $k=>$v){?>
									<option value="<?=$v['id']?>"><?=$v['name']?></option>
									<?php }?>
								</select>
								<select name="city_id" id="seleAreaThird2" onchange="getSelCity('#seleAreaFouth2',this);">
									<option value="0">请选择市</option>
								</select>
								<select name="district_id" id="seleAreaFouth2" >
									<option value="-1">请选择区</option>
								</select><span></span>
							</td>
						</tr>
						<tr>
							<th class="Validform_label"><i>*</i>公司详细地址：</th>
							<td><input name="address_detail" class="w200" type="text" value="<?=$shop_apply['address_detail']?>" id="company_address_detail_2" datatype="*" > <span></span></td>
						</tr>
						<tr>
							<th class="Validform_label"><i>*</i>公司类型：</th>
							<td>
								<select datatype="*" name="company_type" class="w200" id="company_type">
									<option value="">请选择</option>
									<option value="私营企业">私营企业</option>
									<option value="个体户">个体户</option>
									<option value="外企">外企</option>
									<option value="中外合资">中外合资</option>
								</select> <span></span>
							</td>
						</tr>
						<tr>
							<th class="Validform_label"><i>*</i>公司电话：</th>
							<td><input type="text" name="company_phone" value="<?=$shop_apply['company_phone']?>" class="w100" id="company_phone" datatype="*"> <span></span></td>
						</tr>
						<tr>
							<th class="Validform_label"><i>*</i>公司规模：</th>
							<td>员工总数(人)：<input type="text" class="w50" name="company_employee_count" value="<?=$shop_apply['company_employee_count']?>" id="company_employee_count"> 注册资金(万元)：<input type="text" class="w50" name="company_registered_capital" value="<?=$shop_apply['company_registered_capital']?>" id="company_registered_capital"> <span></span></td>
						</tr>
						<tr>
							<th class="Validform_label"><i>*</i>联系人姓名：</th>
							<td><input name="contacts_name" type="text" class="w100" value="<?=$shop_apply['contacts_name']?>" id="contacts_name_2" datatype="*"> <span></span></td>
						</tr>
						<tr>
							<th class="Validform_label"><i>*</i>联系人电话：</th>
							<td><input name="contacts_phone" type="text" class="w100" value="<?=$shop_apply['contacts_phone']?>" id="contacts_phone_2" datatype="*"> <span></span></td>
						</tr>
						<tr>
							<th class="Validform_label"><i>*</i>电子邮箱：</th>
							<td><input type="text" name="contacts_email" size="45" value="<?=$shop_apply['contacts_email']?>" class="w200" id="contacts_email_2" datatype="*"> <span></span></td>
						</tr>
						</tbody>
						<tfoot><tr><td colspan="20">&nbsp;</td></tr></tfoot>
					</table>
					<table border="0" cellpadding="0" cellspacing="0" class="all">
						<thead>
						<tr>
							<th colspan="20" align="left">营业执照信息（副本）</th>
						</tr>
						</thead>
						<tbody>
						<tr>
							<th class="Validform_label"><i>*</i>营业执照号：</th>
							<td><input name="business_licence_number" type="text" class="w200" value="<?=$shop_apply['business_licence_number']?>" id="business_licence_number" datatype="*"> <span></span></td>
						</tr>
						<tr>
							<th class="Validform_label"><i>*</i>法定经营范围：</th>
							<td><textarea name="business_sphere" rows="3" class="w200" id="business_sphere" style="padding: 5px;" datatype="*"><?=$shop_apply['business_sphere']?></textarea> <span></span></td>
						</tr>
						<tr>
							<th class="Validform_label"><i>*</i>营业执照号电子版：</th>
							<td>
                                <div class="test">
                                    <div class="up-button" id="select-img4">选择图片</div>
                                    <div class="img-list" id="img-list4">
                                        <!--图片列表样例-->
                                        <div class="img-item">
                                            <img src="/static/admin/plugin/my_uploader/images/defalut.jpg">
                                            <input type="hidden" name="imgs[]">
                                            <em class="delete" onclick="uploader.del_list(this)">×</em>
                                        </div>
                                    </div>
                                </div>
								<span class="block">请确保图片清晰，文字可辨并有清晰的红色公章。</span>
							</td>
						</tr>
						</tbody>
						<tfoot><tr><td colspan="20">&nbsp;</td></tr></tfoot>
					</table>
					<table border="0" cellpadding="0" cellspacing="0" class="all">
						<thead>
						<tr>
							<th colspan="20" align="left">组织机构代码证</th>
						</tr>
						</thead>
						<tbody>
						<tr>
							<th class="Validform_label"><i>*</i>组织机构代码：</th>
							<td><input name="organization_code" type="text" class="w200" value="<?=$shop_apply['organization_code']?>" id="organization_code" datatype="*"> <span></span></td>
						</tr>
						<tr>
							<th class="Validform_label"><i>*</i>组织机构代码证电子版：</th>
							<td>
                                <div class="test">
                                    <div class="up-button" id="select-img5">选择图片</div>
                                    <div class="img-list" id="img-list5">
                                        <!--图片列表样例-->
                                        <div class="img-item">
                                            <img src="/static/admin/plugin/my_uploader/images/defalut.jpg">
                                            <input type="hidden" name="imgs[]">
                                            <em class="delete" onclick="uploader.del_list(this)">×</em>
                                        </div>
                                    </div>
                                </div>
								<span class="block">请确保图片清晰，文字可辨并有清晰的红色公章。</span>
							</td>
						</tr>
						</tbody>
						<tfoot><tr><td colspan="20">&nbsp;</td></tr></tfoot>
					</table>
					<table border="0" cellpadding="0" cellspacing="0" class="all">
						<thead>
						<tr>
							<th colspan="20" align="left">一般纳税人证明<em>注：所属企业具有一般纳税人证明时，此项为必填。</em></th>
						</tr>
						</thead>
						<tbody>
						<tr>
							<th class="w150">一般纳税人证明：</th>
							<td>
                                <div class="test">
                                    <div class="up-button" id="select-img6">选择图片</div>
                                    <div class="img-list" id="img-list6">
                                        <!--图片列表样例-->
                                        <div class="img-item">
                                            <img src="/static/admin/plugin/my_uploader/images/defalut.jpg">
                                            <input type="hidden" name="imgs[]">
                                            <em class="delete" onclick="uploader.del_list(this)">×</em>
                                        </div>
                                    </div>
                                </div>
								<span class="block">请确保图片清晰，文字可辨并有清晰的红色公章。</span>
							</td>
						</tr>
						</tbody>
						<tfoot><tr><td colspan="20">&nbsp;</td></tr></tfoot>
					</table>
					<input type="hidden" name="shownum" value="1">
					<input type="hidden" name="do" value="1">
					<input type="hidden" name="company" value="1">
					<div class="bottom">
                        <button style="width: 120px;height: 34px;background-color: #F37B1D;border: 0;border-radius: 5px;color: #fff;">提交</button>
					</div>
				</form>
			</div>
		</div>
	</div>
</div>
{/block}

{block name="js"}
<script src="__STATIC__/admin/plugin/my_uploader/js/uploads.js"></script>
<script src="/static/admin/plugin/layer/layer.js"></script>
<script src="/static/admin/plugin/validform/js/Validform_v5.3.2_min.js"></script>
<script src="/static/admin/plugin/validform/js/Validform_v5.3.2_ncr_min.js"></script>

<script>
	$('#select-img').click(function(){
		uploader.open({
			elm:'select-img',//选择图片上传的按钮
			url:"<?=url('common/AjaxController/uploader',['path'=>'member/'.session('member_id')])?>",//服务器url
			up_type:1,//上传图片类型1:单图,2:多图
			img_list:'img-list',//存放选择图片之后的容器
			input_name:'contacts_card_electronic_1',//上传图片表单ID
			img_num:6,//多图上传的总数
			num:2
		});
	});

    $('#select-img2').click(function(){
        uploader.open({
            elm:'select-img2',//选择图片上传的按钮
            url:"<?=url('common/AjaxController/uploader',['path'=>'member/'.session('member_id')])?>",//服务器url
            up_type:1,//上传图片类型1:单图,2:多图
            img_list:'img-list2',//存放选择图片之后的容器
            input_name:'contacts_card_electronic_2',//上传图片表单ID
            img_num:6,//多图上传的总数
            num:2
        });
    });

    $('#select-img3').click(function(){
        uploader.open({
            elm:'select-img3',//选择图片上传的按钮
            url:"<?=url('common/AjaxController/uploader',['path'=>'member/'.session('member_id')])?>",//服务器url
            up_type:1,//上传图片类型1:单图,2:多图
            img_list:'img-list3',//存放选择图片之后的容器
            input_name:'contacts_card_electronic_3',//上传图片表单ID
            img_num:6,//多图上传的总数
            num:2
        });
    });

    $('#select-img4').click(function(){
        uploader.open({
            elm:'select-img4',//选择图片上传的按钮
            url:"<?=url('common/AjaxController/uploader',['path'=>'member/'.session('member_id')])?>",//服务器url
            up_type:1,//上传图片类型1:单图,2:多图
            img_list:'img-list4',//存放选择图片之后的容器
            input_name:'business_licence_number_electronic',//上传图片表单ID
            img_num:6,//多图上传的总数
            num:2
        });
    });

    $('#select-img5').click(function(){
        uploader.open({
            elm:'select-img5',//选择图片上传的按钮
            url:"<?=url('common/AjaxController/uploader',['path'=>'member/'.session('member_id')])?>",//服务器url
            up_type:1,//上传图片类型1:单图,2:多图
            img_list:'img-list5',//存放选择图片之后的容器
            input_name:'organization_code_electronic',//上传图片表单ID
            img_num:6,//多图上传的总数
            num:2
        });
    });

    $('#select-img6').click(function(){
        uploader.open({
            elm:'select-img6',//选择图片上传的按钮
            url:"<?=url('common/AjaxController/uploader',['path'=>'member/'.session('member_id')])?>",//服务器url
            up_type:1,//上传图片类型1:单图,2:多图
            img_list:'img-list6',//存放选择图片之后的容器
            input_name:'general_taxpayer',//上传图片表单ID
            img_num:6,//多图上传的总数
            num:2
        });
    });


    $('input[name="shop_apply_type"]').click(function(){
    	let input_val = $("input[name='shop_apply_type']:checked").val();
		if(input_val == 1){
			$('input[name="apply_type"]').val(1);
			$('#apply_person_info').css('display','block');
			$('#apply_company_info').css('display','none');
		}else{
			$('input[name="apply_type"]').val(2);
			$('#apply_company_info').css('display','block');
			$('#apply_person_info').css('display','none');
		}
	});


	let input_val = $("input[name='shop_apply_type']:checked").val();
	if(input_val == 1){
		$('input[name="apply_type"]').val(1);
		$('#apply_person_info').css('display','block');
		$('#apply_company_info').css('display','none');
	}else{
		$('input[name="apply_type"]').val(2);
		$('#apply_company_info').css('display','block');
		$('#apply_person_info').css('display','none');
	}

</script>

<script>
    let validate = $('#form_person_info').Validform({
        tiptype: function(msg,o,cssctl){
            if(o.type == 3){
                layer.msg(msg);
                return false;
            }
        },

        tipSweep:true, //是否失去焦点就验证
        postonce:true, //表单只提交一次
        ajaxPost:true, //异步提交表单

        beforeSubmit:function(cuprettyorm){
            layer.load(2);
        },
        callback:function(data){
            layer.closeAll();
            if(data.code!=200){
                layer.msg(data.msg);
                return false;
            }else{
                window.location.href="<?=url('index/member/index')?>";
                return false;
            }
        }
    });
	let validate2 = $('#form_company_info').Validform({
	tiptype: function(msg,o,cssctl){
		if(o.type == 3){
			layer.msg(msg);
			return false;
		}
	},

	tipSweep:true, //是否失去焦点就验证
	postonce:true, //表单只提交一次
	ajaxPost:true, //异步提交表单

	beforeSubmit:function(cuprettyorm){
		layer.load(2);
	},
	callback:function(data){
		layer.closeAll();
		if(data.code!=200){
			layer.msg(data.msg);
			return false;
		}else{
			window.location.href="<?=url('index/member/index')?>";
			return false;
		}
	}
});

	function getSelCity(htmlObj,obj){
		let id = $(obj).val();
		if(!id){
			return false;
		}
		$.ajax({
			url:"<?=url('common/AjaxController/ajaxGetProvince')->suffix(false)?>/id/"+id,
			type:'get',
			dataType:'json',
			success:function(res){
				let str = '';
				$(res).each(function(k,v){
					str += '<option value="'+v.id+'">'+v.name+'</option>';
				});
				$(htmlObj).html(str);
			},
			error:function(res){
			}
		});
	}
</script>
{/block}

